package my.jbf.ALLINONE.TXTReaderAndWriter;
import android.app.*;
import android.view.*;

import android.text.*;
import android.os.*;
import my.jbf.ALLINONE.R;
import android.content.pm.*;
import android.widget.*;
import android.view.View.*;
import java.io.*;

public class TXTReaderAndWriter extends Activity
{

	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		// TODO: Implement this method
		super.onCreate(savedInstanceState);
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.TXTReaderAndWriter);
		final EditText et=findViewById(R.id.Edittext);
		Button ReadBtn=findViewById(R.id.readTXT);
		final printout2log pt2log=new printout2log();
		ReadBtn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View p1)
				{
					et.setText(pt2log.read());
					// TODO: Implement this method
				}

			
		});
		Button writeBtn=findViewById(R.id.WriteTXT);
		writeBtn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View p1)
				{
					pt2log.write(et.getText().toString());
					// TODO: Implement this method
				}
				
			
		});
	}
	
	

	
	
	

	
}

